package com.xiaotu.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * @author zhangxiao
 * @create 2021-08-16 16:58
 */
@Configuration
@PropertySource({"classpath:config.properties"})
public class WxConfig {

    /**
     * 主机ip
     */
    public static String sessionHost;

    @Value("${wx.sessionHost:\"\"}")
    public void setSessionHost(String wxSessionHost) {
        sessionHost = wxSessionHost;
    }

    /**
     * 小程序 appId
     */
    public static String appId;

    @Value("${wx.appId:\"\"}")
    public void setAppId(String wxAppId) {
        appId = wxAppId;
    }

    /**
     * 小程序 appSecret
     */
    public static String secret;

    @Value("${wx.secret:\"\"}")
    public void setSecret(String wxSecret) {
        secret = wxSecret;
    }

    /**
     * 小程序 grantType
     */
    public static String grantType;

    @Value("${wx.grantType:\"\"}")
    public void setGrantType(String wxGrantType) {
        grantType = wxGrantType;
    }

}
